home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 52 / Amiga Format AFCD52 (Issue 136, May 2000).iso / -serious- / programming / other / mesa / mesa-tk / src-tk.aos / awindow.h < prev    next >
C/C++ Source or Header  |  2000-02-23  |  2KB  |  62 lines

  1. /*
  2.  * $Id: Awindow.h 3.00 1998/09/21 19:17:47 NielsF Exp NielsF $
  3.  */
  4.  
  5. /*
  6.  * (c) Copyright 1993, Silicon Graphics, Inc.
  7.  * ALL RIGHTS RESERVED
  8.  * Permission to use, copy, modify, and distribute this software for
  9.  * any purpose and without fee is hereby granted, provided that the above
  10.  * copyright notice appear in all copies and that both the copyright notice
  11.  * and this permission notice appear in supporting documentation, and that
  12.  * the name of Silicon Graphics, Inc. not be used in advertising
  13.  * or publicity pertaining to distribution of the software without specific,
  14.  * written prior permission.
  15.  *
  16.  * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
  17.  * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
  18.  * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
  19.  * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
  20.  * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
  21.  * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
  22.  * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
  23.  * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
  24.  * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
  25.  * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
  26.  * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
  27.  * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
  28.  *
  29.  * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
  30.  */
  31.  
  32. #include <GL/gl.h>
  33. #include <GL/gltk.h>
  34. #include <GL/amigamesa.h>
  35.  
  36. extern struct ExecBase *SysBase;
  37. extern struct Library *DOSBase;
  38. extern struct Library *GfxBase;
  39. extern struct Library *IntuitionBase;
  40. extern struct Library *LayersBase;
  41.  
  42. #define    LayerWidth(l)        (l->bounds.MaxX - l->bounds.MinX + 1)
  43. #define    LayerHeight(l)        (l->bounds.MaxY - l->bounds.MinY + 1)
  44. #define    InnerWidth(w)        (w->Width - w->BorderLeft - w->BorderRight)
  45. #define    InnerHeight(w)        (w->Height - w->BorderTop - w->BorderBottom)
  46.  
  47. #define    USE_CLIP_LAYER
  48.  
  49. struct tkWindow {
  50.   GLshort left, top, width, height;
  51.   GLenum type, dmPolicy;
  52.   GLint ID;
  53.  
  54.   amigaMesaContext context;
  55.   struct Screen *screen;
  56.   struct Window *window;
  57.   struct RastPort *rport;
  58. #ifdef USE_CLIP_LAYER
  59.   struct Region *clipreg;
  60. #endif
  61. };
  62.